Optimal. Leaf size=189 \[ \frac {2 a^2 (39 A+34 B) \sin (c+d x)}{45 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}-\frac {4 a (39 A+34 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{315 d}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2 (39 A+34 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{105 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {3055, 3060,
2838, 2830, 2725} \begin {gather*} \frac {2 a^2 (9 A+10 B) \sin (c+d x) \cos ^3(c+d x)}{63 d \sqrt {a \cos (c+d x)+a}}+\frac {2 a^2 (39 A+34 B) \sin (c+d x)}{45 d \sqrt {a \cos (c+d x)+a}}+\frac {2 (39 A+34 B) \sin (c+d x) (a \cos (c+d x)+a)^{3/2}}{105 d}-\frac {4 a (39 A+34 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{315 d}+\frac {2 a B \sin (c+d x) \cos ^3(c+d x) \sqrt {a \cos (c+d x)+a}}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2725
Rule 2830
Rule 2838
Rule 3055
Rule 3060
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+a \cos (c+d x))^{3/2} (A+B \cos (c+d x)) \, dx &=\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2}{9} \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} \left (\frac {3}{2} a (3 A+2 B)+\frac {1}{2} a (9 A+10 B) \cos (c+d x)\right ) \, dx\\ &=\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {1}{21} (a (39 A+34 B)) \int \cos ^2(c+d x) \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2 (39 A+34 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{105 d}+\frac {1}{105} (2 (39 A+34 B)) \int \left (\frac {3 a}{2}-a \cos (c+d x)\right ) \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}-\frac {4 a (39 A+34 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{315 d}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2 (39 A+34 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{105 d}+\frac {1}{45} (a (39 A+34 B)) \int \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {2 a^2 (39 A+34 B) \sin (c+d x)}{45 d \sqrt {a+a \cos (c+d x)}}+\frac {2 a^2 (9 A+10 B) \cos ^3(c+d x) \sin (c+d x)}{63 d \sqrt {a+a \cos (c+d x)}}-\frac {4 a (39 A+34 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{315 d}+\frac {2 a B \cos ^3(c+d x) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{9 d}+\frac {2 (39 A+34 B) (a+a \cos (c+d x))^{3/2} \sin (c+d x)}{105 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.61, size = 103, normalized size = 0.54 \begin {gather*} \frac {a \sqrt {a (1+\cos (c+d x))} (2964 A+2689 B+2 (759 A+799 B) \cos (c+d x)+(468 A+548 B) \cos (2 (c+d x))+90 A \cos (3 (c+d x))+170 B \cos (3 (c+d x))+35 B \cos (4 (c+d x))) \tan \left (\frac {1}{2} (c+d x)\right )}{1260 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 123, normalized size = 0.65
method | result | size |
default | \(\frac {4 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (280 B \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-180 A -900 B \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (504 A +1134 B \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-525 A -735 B \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+315 A +315 B \right ) \sqrt {2}}{315 \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(123\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.58, size = 154, normalized size = 0.81 \begin {gather*} \frac {6 \, {\left (15 \, \sqrt {2} a \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 63 \, \sqrt {2} a \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 175 \, \sqrt {2} a \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 735 \, \sqrt {2} a \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} A \sqrt {a} + {\left (35 \, \sqrt {2} a \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 135 \, \sqrt {2} a \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 378 \, \sqrt {2} a \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 1050 \, \sqrt {2} a \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3780 \, \sqrt {2} a \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} B \sqrt {a}}{2520 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 107, normalized size = 0.57 \begin {gather*} \frac {2 \, {\left (35 \, B a \cos \left (d x + c\right )^{4} + 5 \, {\left (9 \, A + 17 \, B\right )} a \cos \left (d x + c\right )^{3} + 3 \, {\left (39 \, A + 34 \, B\right )} a \cos \left (d x + c\right )^{2} + 4 \, {\left (39 \, A + 34 \, B\right )} a \cos \left (d x + c\right ) + 8 \, {\left (39 \, A + 34 \, B\right )} a\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.05, size = 191, normalized size = 1.01 \begin {gather*} \frac {\sqrt {2} {\left (35 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {9}{2} \, d x + \frac {9}{2} \, c\right ) + 45 \, {\left (2 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 3 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {7}{2} \, d x + \frac {7}{2} \, c\right ) + 378 \, {\left (A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {5}{2} \, d x + \frac {5}{2} \, c\right ) + 1050 \, {\left (A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 630 \, {\left (7 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 6 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \sqrt {a}}{2520 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (c+d\,x\right )}^2\,\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________